﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.DAO;
using Com.CMS263.PO;
namespace Com.CMS263.BLL
{
  
   public class MyStyleBLL:BaseBLL<MyStyle>
    {
       MyStyleDAO dao = new MyStyleDAO();
        public override MyStyle GetModel()
        {
            throw new NotImplementedException();
        }
        public MyStyle GetStyleById(int id)
        {
            return dao.GetStyleById(id);
        }

        public MyStyle GetStyleByLevel(int level)
        {
                return dao.GetStyleByLevel(level);
           
        }

        public bool Add(MyStyle style)
        {
            return dao.Add(style);
        }

        public IList<MyStyle> GetAll()
        {
            MyStyle m = new MyStyle();
            return dao.GetItemList<MyStyle>(m);
        }

        public bool UpDate(MyStyle style)
        {
            return dao.UpDate(style);
        }

        public IList<MyStyle> GetAllByOrderNum()
        {
            return dao.GetAll("from MyStyle order by orderNum desc,Id desc ");
        }
    }
}
